import layout from '../layout'
import home from '../home'
import cart from '../cart'
import login from '../login'
import detail from '../detail'
const routes = [
    {
        from: '/',
        to: '/layout'
    },
    {
        path: "/layout",
        com: layout,
        children: [
            {
                from: "/layout",
                to: '/layout/home'
            },
            {
                path: "/layout/home",
                com: home
            },
            {
                path: "/layout/cart",
                com: cart
            }
        ]
    },
    {
        path: "/login",
        com: login
    },
    {
        path: "/detail/:id",
        com: detail
    }
]

export default routes;